package org.fer.practico5;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Button bAct1 = (Button) this.findViewById(R.id.buttonAct1);
		Button bAct2 = (Button) this.findViewById(R.id.buttonAct2);
		Button bAct3 = (Button) this.findViewById(R.id.buttonAct3);

		bAct1.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View b1) {
				Intent intent = new Intent(b1.getContext(), Activity1.class);

				startActivity(intent);
			}
		});

		bAct2.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View b2) {
				Intent intent = new Intent(b2.getContext(), Activity2.class);
				startActivity(intent);
			}
		});

		bAct3.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View b3) {
				Intent intent = new Intent(b3.getContext(), Activity3.class);
				startActivity(intent);
			}
		});

	}
}